package com.atguigu04.set.exer2;

import java.util.HashSet;
import java.util.Random;
import java.util.Set;

/**
 * ClassName: SetTest2
 * Package: com.atguigu04.set.exer2
 * Description:
 *
 * @Author BuTang
 * @Create 2023/6/7 10:22
 * @Version 1.0
 */
public class SetTest2 {
    public static void main(String[] args) {
        Set set = new HashSet();
        while (set.size()<10){
            int type = (int) (Math.random()*20);
            set.add(type);
        }
        System.out.println(set);
    }
}
